package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PoStorereqBMapper;
import com.ruoyi.system.domain.PoStorereqB;
import com.ruoyi.system.service.IPoStorereqBService;

/**
 * 物资需求申请单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-16
 */
@Service
public class PoStorereqBServiceImpl implements IPoStorereqBService 
{
    @Autowired
    private PoStorereqBMapper poStorereqBMapper;

    /**
     * 查询物资需求申请单明细
     * 
     * @param pkStorereqB 物资需求申请单明细主键
     * @return 物资需求申请单明细
     */
    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public PoStorereqB selectPoStorereqBByPkStorereqB(String pkStorereqB)
    {
        return poStorereqBMapper.selectPoStorereqBByPkStorereqB(pkStorereqB);
    }

    /**
     * 查询物资需求申请单明细列表
     * 
     * @param poStorereqB 物资需求申请单明细
     * @return 物资需求申请单明细
     */
    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public List<PoStorereqB> selectPoStorereqBList(PoStorereqB poStorereqB)
    {
        return poStorereqBMapper.selectPoStorereqBList(poStorereqB);
    }

    /**
     * 新增物资需求申请单明细
     * 
     * @param poStorereqB 物资需求申请单明细
     * @return 结果
     */
    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public int insertPoStorereqB(PoStorereqB poStorereqB)
    {
        return poStorereqBMapper.insertPoStorereqB(poStorereqB);
    }

    /**
     * 修改物资需求申请单明细
     * 
     * @param poStorereqB 物资需求申请单明细
     * @return 结果
     */
    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public int updatePoStorereqB(PoStorereqB poStorereqB)
    {
        return poStorereqBMapper.updatePoStorereqB(poStorereqB);
    }

    /**
     * 批量删除物资需求申请单明细
     * 
     * @param pkStorereqBs 需要删除的物资需求申请单明细主键
     * @return 结果
     */
    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public int deletePoStorereqBByPkStorereqBs(String[] pkStorereqBs)
    {
        return poStorereqBMapper.deletePoStorereqBByPkStorereqBs(pkStorereqBs);
    }

    /**
     * 删除物资需求申请单明细信息
     * 
     * @param pkStorereqB 物资需求申请单明细主键
     * @return 结果
     */
    @Override
    @DataSource(value = DataSourceType.YONGYOU)
    public int deletePoStorereqBByPkStorereqB(String pkStorereqB)
    {
        return poStorereqBMapper.deletePoStorereqBByPkStorereqB(pkStorereqB);
    }
}
